<html>
<head><meta charset="utf-8"><title>is_x86_feature_detected macro · t-libs/stdarch · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/208962-t-libs/stdarch/index.html">t-libs/stdarch</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected.20macro.html">is_x86_feature_detected macro</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="206405937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected%20macro/near/206405937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected.20macro.html#206405937">(Aug 09 2020 at 18:19)</a>:</h4>
<p>How does the <code>is_x86_feature_detected!</code> end up getting imported into the prelude?</p>



<a name="206410981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected%20macro/near/206410981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected.20macro.html#206410981">(Aug 09 2020 at 20:45)</a>:</h4>
<p>The prelude is sonething like <code>#[macro_use] extern crate std; #[prelude_import] use std::prelude::v1::*;</code>. The <code>#[macro_use]</code> is the reason <code>is_x86_feature_detected!</code> is available everywhere. It is not part of the prelude though. <code>macro_rules!</code> doesn't really follow the normal resolution rules. Instead it is available to everything after it's definition/<code>#[macro_use]</code>.</p>



<a name="206411027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected%20macro/near/206411027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/208962-t-libs/stdarch/topic/is_x86_feature_detected.20macro.html#206411027">(Aug 09 2020 at 20:46)</a>:</h4>
<p><span class="user-mention" data-user-id="125294">@Aaron Hill</span> ^</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>